{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [],
   "source": [
    "from math import pi, sin, cos, tan\n",
    "from matplotlib import pyplot as plt\n",
    "import pickle\n",
    "import numpy as np\n",
    "\n",
    "%matplotlib inline\n",
    "\n",
    "\n",
    "\n",
    "class Car:\n",
    "    \n",
    "    fps       = 4.0     # frames per second\n",
    "    dt        = 1.0 / fps # time per frame\n",
    "    max_steer = 30.0      # degrees\n",
    "    L         = 4.0       # meters\n",
    "    max_a     = 2 * 9.8   # m/s/s\n",
    "    max_brake = 5 * 9.8   \n",
    "    \n",
    "    def __init__(self):\n",
    "        # state variables\n",
    "        self.x     = 0.0\n",
    "        self.y     = 0.0\n",
    "        self.theta = 0.0  # east\n",
    "        self.speed = 0.0\n",
    "        self.omega = 0.0\n",
    "        self.t     = 0.0\n",
    "        \n",
    "        # driver controllable\n",
    "        self.a_y   = 0.0\n",
    "        self.alpha = 0.0\n",
    "        \n",
    "        # state history\n",
    "        self.history = [(0,0,0,0,0,0,0,0)]\n",
    "        \n",
    "        self.braking = False\n",
    "        self.backing = False\n",
    "        \n",
    "    def reverse(self):\n",
    "        self.a_y = 0.0\n",
    "        self.backing = True\n",
    "        \n",
    "    def forward(self):\n",
    "        self.a_y = 0.0\n",
    "        self.backing = False\n",
    "\n",
    "    def steer(self, angle):\n",
    "        assert -self.max_steer <= angle <= self.max_steer\n",
    "        self.alpha = angle * pi / 180\n",
    "    \n",
    "    def gas(self, amount):\n",
    "        assert 0.0 <= amount <= 1.0\n",
    "        self.a_y = amount * self.max_a\n",
    "        \n",
    "#     def brake(self, amount):\n",
    "#         assert 0.0 <= amount <= 1.0\n",
    "#         sgn = -1.0\n",
    "#         if self.speed < 0.0:\n",
    "#             sgn = 1.0\n",
    "#         self.braking = True\n",
    "#         self.a_y = sgn * amount * self.max_brake\n",
    "    \n",
    "    def go(self, duration):\n",
    "        num_frames = int(duration / self.dt)\n",
    "        for i in range(num_frames):\n",
    "            snapshot = (\n",
    "                self.t+self.dt,    # \n",
    "                self.a_y,  # \n",
    "                self.speed,#\n",
    "                self.x,    \n",
    "                self.y,    \n",
    "                self.theta,\n",
    "                self.omega, #\n",
    "                self.alpha,#\n",
    "            )\n",
    "            self.history.append(snapshot)\n",
    "            self.increment_frame()\n",
    "    \n",
    "    def increment_frame(self):\n",
    "        new_t      = self.t + self.dt\n",
    "        new_a_y    = self.a_y\n",
    "        new_speed  = self.speed + self.a_y * self.dt\n",
    "        if self.backing:\n",
    "            new_speed  = self.speed - self.a_y * self.dt \n",
    "        new_alpha  = self.alpha\n",
    "        new_omega  = self.speed / self.L * tan(self.alpha)\n",
    "        new_theta  = (self.theta + self.omega * self.dt) % (2*pi)\n",
    "        \n",
    "        # intermediate steps for x, y\n",
    "        distance   = self.speed * self.dt\n",
    "        dx         = distance * cos(self.theta)\n",
    "        dy         = distance * sin(self.theta)\n",
    "        \n",
    "        new_x      = self.x + dx\n",
    "        new_y      = self.y + dy\n",
    "        \n",
    "        self.t     = new_t\n",
    "        self.a_y   = new_a_y\n",
    "        self.speed = new_speed\n",
    "        self.alpha = new_alpha\n",
    "        self.omega = new_omega\n",
    "        self.theta = new_theta\n",
    "        self.x     = new_x\n",
    "        self.y     = new_y\n",
    "        \n",
    "    def show_history(self, increment=10):\n",
    "        t, a, s, x, y, theta, omega, alpha = np.array(car.history).T\n",
    "        plt.scatter(x[::increment],y[::increment])\n",
    "        \n",
    "    def show_history2(self, inc=10):\n",
    "        t, a, s, x, y, theta, omega, alpha = np.array(car.history).T\n",
    "        u = np.cos(theta)\n",
    "        v = np.sin(theta)\n",
    "#         m = np.hypot(u,v)\n",
    "        Q = plt.quiver(x[::inc],y[::inc],u[::inc],v[::inc], \n",
    "                       units='x', pivot='tip')\n",
    "        qk = plt.quiverkey(Q, 0.9, 0.9, 2, r'$1 \\frac{m}{s}', \n",
    "                           labelpos='E', coordinates='figure' )\n",
    "        \n",
    "        \n",
    "    def get_displacements(self):\n",
    "        disp = 0\n",
    "        displacements = [disp]\n",
    "        t, a, s, x, y, theta, omega, alpha = np.array(car.history).T\n",
    "        last_t = 0.0\n",
    "        for ts, speed in zip(t[1:], s[1:] ):\n",
    "            dt = ts - last_t\n",
    "            dD = speed * dt\n",
    "            disp += dD\n",
    "            displacements.append(disp)\n",
    "            last_t = ts\n",
    "        return displacements\n",
    "        \n",
    "        \n",
    "    def save_trajectory(self, filename):\n",
    "        t, a, s, x, y, theta, omega, alpha = np.array(car.history).T\n",
    "        displacements = self.get_displacements()\n",
    "        assert(len(displacements) == len(t) )\n",
    "        trajectory = zip(t, displacements, omega, a)\n",
    "        with open(filename, 'wb') as f:\n",
    "            pickle.dump(trajectory, f)\n",
    "        print(\"saved trajectory to\", filename)\n",
    "            "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD8CAYAAAB0IB+mAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3Xl4FFW6P/DvmwUISQhbgEACARK2\nCEgIIsQHxMgSICCCPyKDyIzXjIODF3VwQK5edFxHryszLIrDjKIooBDZVQRHQDAoIKuEbUC2sCVh\nCyH9/v5Id9shHeiku1Pd1d/P8/STrlPVdd5KOm+fPlV1jqgqiIjIN4hIOICL6oXkHOTpHRIRkVs6\nA9gjIq+JSB8RCfXETkUkXtjCJyLyLSKyEkA/6+I5ACsAfA5ghaqeqcL+/gBgAhM+EZGLRKQVgBeq\noarWAFKclJcAWIfS5P+5qu650Y5EJBLAPgAZTPhERC4Ska4AcoyOw8EuAH9W1c8r2sB6TuAXAPeE\nVFtYRET+rwhAbjXUEwmgcQXrzgFYDmAJXOjiUdULIjIGwAts4RMR+RgRmQPg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z11FMYMmQIfvrpJ3vZ3//+dyQkJODgwYPYtGkT\nYmNj0bVrV/vvzHaHp7fExcUhPT0d0dHRyMzMxNy5c3HmzBmv1umqy5cvY/v27ViwYAEWLlxY5ffP\njBkzsH79egDA+PHjMX/+fNSvX98n++8BlLZMvfUAEAxgH4BWAGoA2AqgQ0Xbt2/fXjdu3KgbN27U\nTz/9VAFU+AgJCSlXlpiYqOPGjdOYmJgy5eHh4Tp48GCdNm2a7t69WydOnFjutcnJyfrkk0/qmjVr\nNC8vT0+dOqUrV64st118fLw++OCDumDBAj169KieOnXK/ti3b59GRESU2b5BgwZ633336SeffKIH\nDhwos73tceLECY2Pjy/zusjISB0+fLjOmTNHT548qaqqZ86ccfr6vLw87dChQ5nX165dW4cOHarv\nvvuuHjt2TB2dPn3a6X5Onjypbdq0Kfe7GzZsmM6ePVuPHz+u17JYLE73derUKT1y5IhGR0eX2V/d\nunU1MzNT586dq2fOnCm3P5vi4uIK97t582YNCgoqs9+mTZtqVlaWfv7553rhwoUK92tz8eLFCvf/\nt7/9rdzfvWPHjjp58mRdv369Xr169Yb7tzl37lyF9fTr169MHTVq1NB+/frp22+/rQcOHHC5DlXV\nxYsXO/0/ERH9+eef9ccff9Tg4OByv7MHH3xQs7OzXfqdVaSgoKDCYxw7dmyZOoODg7VXr17617/+\nVXft2qUWi6XK9d6IxWLRkydP6jfffKOzZs3Sxx57TAcOHKitW7e2v3+6d++up06dqtL+Dx8+rJGR\nkQpA4+LitKCgQFVVv/76aw8ehWsA5KgrOdmVjar6ANADwEqH5ckAJl9n++sm+UB9iIj27NlTo6Ki\nqryPbt266bPPPqs//vijNm7cuMpxdO/eXZ977jndunWrWiwWtVgsVY4pODhYe/fura+88oru3r27\nzBt469atVd5vWFiYDh48WGfOnKm//PKL03+QN954o8r7j46O1rFjx+qCBQvs/+QVSU1NrXI9N910\nk8sfMpcuXdLatWtXua5atWrp4MGDdcaMGXrkyJHr1nWtkSNHVrnehIQEffTRR3X16tV65cqVStVb\n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tcDoeKpKVUtU\n9WaUtpBvAdDe2WbVG1XliMhgACdVdbNjsZNNffo4rFJVNRml3bYPi0gvowOqghAAyQCmq2oXABdg\nQDeUGRL+EQBxDsuxAI4aFIsnnBCRGACw/jxpcDwuEZFQlCb7uar6qbXYL4/FRlXPAViD0vMSdUUk\nxLrKH95jqQCGiMhBAPNQ2q3zBvzvOKCqR60/TwL4DKUfwv723joC4IiqbrQuL0DpB0C1HocZEv73\nABKtVx/UAJAJINvgmNyRDeB+6/P7Udof7tNERADMBrBLVV9zWOWPxxItInWtz8MA3InSk2tfAxhh\n3cznj0VVJ6tqrKrGo/R/YrWq/gZ+dhwiEi4ikbbnAPoB2A4/e2+p6nEAh0WkrbUoDcBOVPdxGH0y\nw0MnRAYC+Bmlfa1TjI6nEnF/BOAYgGKUtgAeQGk/61cA9lp/1jc6TheO4zaUdg1sA7DF+hjop8fS\nCcCP1mPZDuBpa3krAJsA5AKYD6Cm0bFW4phuB7DEH4/DGu9W62OH7f/bT99bNwPIsb63FgGoV93H\nwTttiYgChBm6dIiIyAVM+EREAYIJn4goQDDhExEFCCZ8IqIAwYRPRBQgmPCJiAIEEz4RUYD4/8wt\ngvtKtr4pAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f59b80894e0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Maneuver 1 - accelerate and then turn 270 degrees left\n",
    "car = Car()\n",
    "car.gas(0.2)\n",
    "car.steer(0.0)\n",
    "car.go(5.0)\n",
    "\n",
    "car.gas(0.0)\n",
    "car.steer(20)\n",
    "car.go(2.66)\n",
    "\n",
    "car.steer(0.0)\n",
    "car.go(3)\n",
    "# car.show_history(15)\n",
    "car.show_history2(10)\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "342"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(car.history)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "342"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(car.get_displacements())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[154.04375000000013,\n",
       " 154.65625000000014,\n",
       " 155.26875000000015,\n",
       " 155.88125000000016,\n",
       " 156.49375000000018,\n",
       " 157.10625000000019,\n",
       " 157.7187500000002,\n",
       " 158.33125000000021,\n",
       " 158.94375000000022,\n",
       " 159.55625000000023]"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car.get_displacements()[-10:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "saved trajectory to trajectory_1.pickle\n"
     ]
    }
   ],
   "source": [
    "car.save_trajectory('trajectory_1.pickle')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "data generator.ipynb  Reconstructing Trajectories.ipynb  testing.py\r\n",
      "helpers.py            solution.py                        turn_270_left.pickle\r\n"
     ]
    }
   ],
   "source": [
    "ls"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAW4AAAD8CAYAAABXe05zAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3X1YV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dhwCMd2ddP2g/gn/unPR0f/kCeNP+d7YLQLYr+4vfnCQiMpj2MlRCRETNxOAm\nIjIYBjcRkcEwuImIDIbBTURkMAxuIiKDYXATERkMg5uIyGD+P7VIUZGwMVEjAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f59b1b20978>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# maneuver 2 - accelerate onto highway and change lanes\n",
    "\n",
    "car = Car()\n",
    "\n",
    "car.gas(0.3)\n",
    "car.go(5.0)\n",
    "\n",
    "car.gas(0)\n",
    "car.steer(1)\n",
    "car.go(1)\n",
    "\n",
    "car.steer(0)\n",
    "car.go(0.1)\n",
    "\n",
    "car.steer(-1)\n",
    "car.go(1)\n",
    "\n",
    "car.steer(0)\n",
    "car.go(1)\n",
    "\n",
    "car.show_history2(5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "260"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(car.history)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "saved trajectory to trajectory_2.pickle\n"
     ]
    }
   ],
   "source": [
    "car.save_trajectory(\"trajectory_2.pickle\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX8AAAD8CAYAAACfF6SlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3XtcVHX+P/DXm5sgCHjhrshFQRME\nBU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onwdWgPoA6AXgHdEJEad9DSmGtblLwAWoHyLcgGA5Sj/p3RaNazP4wAym7Yi+9xofVR1varOBTBX\nROYAmALgySYtsI5qWh9Lm7kAygC81ZS11Udt1sfF2bqdW6NkmUuEv6oOqW6aiEwG8HdL2P9TRMwo\nvy6G7bt1O9iN1qUiEXkV5fuVnVp16yMiiQCiAeyx3J6wPYCvRKS3qv7YhCXWSW1/PwD+L4D34eTh\nX9P6iMgYADkABjvrBlNFdfj9uKpCAB0qvG4P4ERjdNQcdvu8C2AQAIhIHAAvuOgFnkQkrMLL36L8\nAJZLUtVvVDVYVaNUNQrlf9Q9nTn4ayIinSu8HAbgoKNqaQgikgVgNoBhqvqLo+shAMAuAJ1FJFpE\nvACMBrChMTpyiS3/GrwO4HUR+RbAZQBjXGELphpLRSQZ5R/z/g3g944th66zWETiAZhRfsXZSQ6u\nx14vAmgB4EPLp7P/VVWXXScR+S2AFwAEAXhfRL5W1dscXFadqGqZiEwBsBWAO4DXVXVfY/TFb/gS\nERlQc9jtQ0REdcTwJyIyIIY/EZEBMfyJiAyI4U9EZEAMfyIiA2L4ExEZEMOfiMiA/j9/wKfUTqwc\nNwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f59b1b20f28>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "car = Car()\n",
    "\n",
    "car.reverse()\n",
    "car.gas(0.1)\n",
    "car.steer(0.0)\n",
    "car.go(1.0)\n",
    "\n",
    "car.gas(0.0)\n",
    "car.steer(-car.max_steer)\n",
    "car.go(1.0)\n",
    "\n",
    "car.steer(car.max_steer)\n",
    "car.go(1.0)\n",
    "\n",
    "car.steer(0.0)\n",
    "car.go(0.2)\n",
    "\n",
    "car.forward()\n",
    "car.gas(0.15)\n",
    "car.go(2.0)\n",
    "\n",
    "car.gas(0.0)\n",
    "car.go(0.2)\n",
    "\n",
    "car.reverse()\n",
    "car.gas(0.5)\n",
    "car.go(0.41)\n",
    "\n",
    "car.show_history2(5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "saved trajectory to trajectory_3.pickle\n"
     ]
    }
   ],
   "source": [
    "car.save_trajectory(\"trajectory_3.pickle\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD8CAYAAAB0IB+mAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAHHxJREFUeJzt3X10VOW59/HvRUJ4RyAEFTSAgoAg\n0RrpUVFAXoqeJ1IQWloV66OFolYtj7VSPYq1YrUetZb6Ei2rsJaCLZSjqGiBCiikR4LCMRzQ2kIR\nEAMWpbwmhOv5Iy8SMkkgMzt7kv37rDUrM/fec9/X7DX5ZeeevfeYuyMiIsnBzFoCBzyAcG6S6A5F\nRCQuGcDHZva0mf27mbVIRKdm1s20hy8iklzM7FlgYtnD/cASYCHwmrt/Wof+JgO3K/BFRI6TmbUB\nnquHoU4BBlWzbDWl4f8qsLa2qZ+ymv8G5CjwRUSOk5mlA7vCruMoW4D7gNnufiTWCmbWCtgGjEut\nz8pERBq4I8DH9TBOc+C0apbtBxbz1RTPjpo6cvd9ZjYBmK49fBGRJGNm0yjdcy+3la+mcd5y9wN1\n6FMf2oqIJBMzawdsAv5KacgvBNbV9TBNM2sNpAOmwBcRSSJmdirgtU3VnEB/7YE5QEcFvohIBJhZ\nt6T60LZjx47erVu3sMsQkTht3bqVzz77DAAzo1u3bnTo0IHNmzeTlpZG586dQ66wcVmzZs0ud8+o\nZbUvkirwu3XrRn5+fthliEgC5ObmctNNN1FSUsKmTZu4/vrref7559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F7AB6EIDf880hsDvAnxy1OOtZW1SyoE/mdkaM5sYdjFJ5mR3/xRKf8GBTiHX\nk0xuMbP/KZvyaVDTFolmZt2A84D/poG/ZxpD4Me6gpMOPfrKxe7+NUqnvG42s0vDLkiS3tPAmcC5\nwKfAf4ZbTnjMrDUwH7jd3feEXU+8GkPgbwVOP+rxacD2kGpJOu6+vexnIaUXuhsQbkVJ5TMzOxWg\n7GdhyPUkBXf/zN1L3P0I8BwRfc+YWVNKw/4Fd/9jWXODfs80hsBfDfQ0s+5mlgaMB14JuaakYGat\nzKxN+X1gBKVfPC+lXgGuK7t/HVDTl/pERnmglRlNBN8zVnrt598CG9z9saMWNej3TKM48arssLEn\ngBRgprs/GHJJScHMzuCry1enAi9GdduY2RxgMKVXO/wMuA/4L+D3QCawBRjn7pH6ALOa7TKY0ukc\nBzYDk8rnraPCzAYCbwMfAEfKmn9K6Tx+g33PNIrAFxGR2jWGKR0RETkOCnwRkYhQ4IuIRIQCX0Qk\nIhT4IiIRocAXEYkIBb6ISEQo8EVEIuL/A0qCESwFCwLyAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f59b84a6438>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "car = Car()\n",
    "\n",
    "car.gas(1.0)\n",
    "car.go(1.0)\n",
    "car.steer(-car.max_steer)\n",
    "car.gas(0.0)\n",
    "car.go(2.5)\n",
    "# car.steer(0.0)\n",
    "# car.go(1.0)\n",
    "\n",
    "car.show_history2(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "15"
      ]
     },
     "execution_count": 50,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(car.history)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "saved trajectory to trajectory_example.pickle\n"
     ]
    }
   ],
   "source": [
    "car.save_trajectory(\"trajectory_example.pickle\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
